class Solution(object):
    def countGoodNumbers(self, n):
        ou_count = (n + 1) // 2
        ji_count = n - ou_count
        return pow(5, ou_count, 10 ** 9 + 7) * pow(4, ji_count, 10 ** 9 + 7) % (10 ** 9 + 7)

